package yur.wedding.validator;

import org.apache.commons.lang.StringUtils;
import yur.wedding.exception.RRException;

/**
 * 校验数据是否为空
 *
 * @Author: Yur
 * @Data:2021/11/7 22:38
 */
public class Assert {
    public static void isBlank(String str, String message) {
        if (StringUtils.isBlank(str)) {
            throw new RRException(message);
        }
    }

    public static void isNull(Object object, String message) {
        if (object == null) {
            throw new RRException(message);
        }
    }
}
